﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Messages.MessagesBoard" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="res/layui/css/layui.css" rel="stylesheet" />
    <link href="res/static/css/mian.css" rel="stylesheet" />
    <%--<link href="res/css/diy.css" rel="stylesheet" />--%>
    <script src="res/pc.js"></script>
    <script src="res/jquery.js"></script>
    <script src="res/layer/layer.js"></script>
    <title>MessagesBoard</title>
    <style type="text/css">
        .auto-style1 {
            left: 0px;
            top: 0px;
        }
        .f_btn1 {
            background-color: rgba(0,0,0,0.5);
            line-height: 36px;
            height: 36px;
            font-family: "微软雅黑";
            font-size: 14px;
            color: #fff;
            border-radius: 50px;
            outline: none;
            float: right;
            padding-right: 20px;
            padding-left: 20px;
            margin-right: 5px;
            margin-left: 5px;
            cursor: pointer;
        }
    </style>
    <script>
        $(function () {
          layer.alert('见到你真的很高兴', {icon: 6});
        });

    </script>
    <script>


        //打开登录注册界面
        function sxc_user_login() {
            layer.open({
                title: '登录&&注册',
                type: 2,
                area: ['800px','400px'],
                fixed: false, //不固定
                maxmin: true,
                content: ['User_login.aspx', 'no'],
                success: function (index, layero) {

                }

            });
        }
    </script>

</head>
<body class="lay-blog">
    <%-- 头部 --%>
    <div class="header">
        <div class="header-wrap">
            <h1 class="logo pull-left">
                <a href="index.html">
                    <img src="res/static/images/logo_留言.png" alt="" class="logo-img" />
                    <img src="res/static/images/logo-text.png" alt="" class="logo-text" />
                </a>
            </h1>
            <div class="layui-form blog-seach pull-left">
                <div class="layui-form-item blog-sewrap">
                    <div class="layui-input-block blog-sebox">
                        <i class="layui-icon layui-icon-search"></i>
                        <input type="text" name="title" lay-verify="title" autocomplete="off" class="layui-input" />
                    </div>
                </div>
            </div>
            <div class="blog-nav pull-right">
                <ul class="layui-nav pull-left">
                    <li class="layui-nav-item"><a href="index.aspx">首页</a></li>
                    <li class="layui-nav-item  layui-this"><a href="MessagesBoard.aspx">留言</a></li>
                    <li class="layui-nav-item"><a href="about.aspx">关于</a></li>
                </ul>

                <div class="personal pull-left">
                    <div class="btn">
                        <div class="f_btn1" onclick="tc('闲言','AddMsg.aspx',800,400)"><i class="layui-icon layui-icon-template-1"></i>闲言</div>
                        
                        <div class="f_btn1" onclick="sxc_user_login()"><i class="layui-icon layui-icon-username"></i>登陆</div>
                    </div>
                </div>

            </div>
            <div class="mobile-nav pull-right" id="mobile-nav">
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more"></i>
                </a>
            </div>
        </div>
        <ul class="pop-nav" id="pop-nav">
            <li><a href="index.aspx">首页</a></li>
            <li><a href="message.aspx">留言</a></li>
            <li><a href="about.aspx">关于</a></li>
        </ul>
    </div>

    <div class="main">
        <%-- 留言框 --%>
        <div class="comment">
            <div class="c_list list-loop">
                <div class="contar-wrap" id="contar-wrap">

                    <%-- 输入留言框form --%>
                    <form class="layui-form" id="Messagesform" runat="server">
                        <div class="layui-form-item layui-form-text">
                            <%-- 发布者的昵称 --%>
                            <div>
                                <asp:Label ID="Label1" runat="server" Text="昵名："></asp:Label>
                                <asp:TextBox ID="TextBoxAuthor" runat="server" Style="resize: none"></asp:TextBox>
                            </div>

                            <div>
                                <%-- 发布者的留言TextBoxMessage --%>
                                <asp:TextBox ID="TextBoxMessage" runat="server" class="layui-textarea" TextMode="MultiLine" Style="overflow-x: hidden; overflow-y: auto;" Height="125px" Width="100%" CssClass="auto-style1"></asp:TextBox>
                            </div>
                            <%--<textarea  class="layui-textarea" id="TextAreaMessage" style="resize:none"></textarea>--%>
                        </div>

                        <div class="item-btn">
                            <asp:Button ID="ButtonSubmit" runat="server" class="layui-btn layui-btn-normal" Text="提交" OnClientClick="" OnClick="ButtonSubmit_Click" />
                            <%--<button class="layui-btn layui-btn-normal" id="item-btn">提交</button>--%>
                        </div>
                    </form>
                    <%-- 显示数据 --%>
                    <%-- 美化更好的显示数据UI --%>
                    <%-- <div class="comment">
				        <div class="c_list list-loop">--%>
                    <div class="c_show loop">
                        <%-- 头像细节 --%>
                        <div class="details-avatar">
                            <div class="c_tx">
                                <a href='?uid=0'>
                                    <img src='res/static/images/user_03.jpg' /></a>
                            </div>
                            <div class="author-info-card" style="top: 80px;">

                                <div class="avatar-container-80 center">
                                    <div class="author-avatar">
                                        <a href='?uid=0'>
                                            <img src='res/static/images/user_03.jpg' /></a>
                                    </div>
                                </div>
                                <div class="presonal-info">
                                    <span class="author-name" z-st="user_card_name">admin</span>

                                </div>
                                <div class="position-info">
                                    <span>云南省昆明市&nbsp;|&nbsp;管理员</span>
                                </div>
                                <div class="info-num">
                                    <div class="work">
                                        <p>发布</p>
                                        <p class="num">18</p>
                                    </div>
                                    <div class="fans">
                                        <p>积分</p>
                                        <p class="num">999999</p>
                                    </div>
                                </div>
                                <div class="btn-area">
                                    <input type="button" title="发私信" class="btn-default-secondary" value="私信" onclick="tc('私信【admin】', 'lib/message.asp?class=2&send=0', 800, 400)">
                                </div>
                            </div>
                        </div>

                        <!--评论细节-->
                        <div class="comment_list">
                            <ul>
                                <li>
                                    <h1>admin</h1>
                                    <div class="iconfont icon-fire ontop"></div>

                                    <h2>管理员&nbsp;|&nbsp;云南省昆明市 | 25小时前 </h2>
                                </li>

                                <li>
                                    <article class="readmore">
                                        jianbook3.0下载
                                    </article>
                                </li>

                            </ul>
                            <div class="clear"></div>

                            <div class="c_tool">
                                <span class="layui-icon layui-icon-praise" onclick="zan(this,857)"><b>4</b></span>

                                <span class="layui-icon layui-icon-dialogue" onclick="tc('回复【admin】','lib/message.asp?upid=857',800,400)"><b>0</b></span>

                                <a href="javascript:void(0)" class="c_file" onclick="down_file(857)"><i class="iconfont icon-fujian1"></i>附件下载

                                </a><em class="lmtype"><a href="?lm=下载"><i class=" layui-icon layui-icon-note"></i>下载</a></em>
                            </div>
                        </div>
                        <!-- end comment_list -->


                        <%-- end c_show loop --%>
                    </div>

                    <div id="LAY-msg-box">
                        <div class="info-box">
                            <div>
                                <asp:Repeater ID="RepeaterMessages" runat="server">
                                    <%-- 具体数据显示userName 和 message --%>
                                    <ItemTemplate>
                                        <div class="info-item">
                                            <img class="info-img" src="res/static/images/info-img.png" alt="" />
                                            <div class="info-text">
                                                <p class="title count">

                                                    <span class="info-img like"><i class="layui-icon layui-icon-praise"></i>5.8万</span>

                                                    <div style="font-size: 12px; color: rgba(255,255,255,0.5); float: right; font-weight: normal;">
                                                        <span class="name">
                                                            <%#DataBinder.Eval(Container.DataItem, "M_userName")%>|
                                                        </span>
                                                        发表于：<%#DataBinder.Eval(Container.DataItem, "M_date")%>
                                                    </div>
                                                </p>
                                            </div>
                                            <div class="info-text">
                                                <div class="info-intr">
                                                    <%#DataBinder.Eval(Container.DataItem, "M_message")%>
                                                </div>

                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </div>
                            <%-- 模拟数据显示 --%>
                            <div class="info-item">
                                <img class="info-img" src="res/static/images/info-img.png" alt="" />
                                <div class="info-text">
                                    <p class="title count">
                                        <span class="name">一片空白</span>
                                        <span class="info-img like"><i class="layui-icon layui-icon-praise"></i>5.8万</span>
                                    </p>
                                    <p class="info-intr">
                                        父爱如山，不善表达。回想十多年前，总记得父亲有个宽厚的肩膀，小小的自己跨坐在上面，越过人山人海
								    去看更广阔的天空，那个时候期望自己有一双翅膀，能够像鸟儿一样飞得高，看得远。虽然父亲有时会和自己开玩笑，但在做错事的时候会受到严厉的训斥。
								    父亲有双粗糙的大手掌。
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="test1" class="paging"></div>
                </div>
                <%-- end c_list list-loop --%>
            </div>
            <%-- end commnet --%>
        </div>
        <%-- end main --%>
    </div>



    <%--<script src="res/layui/layui.js">

	</script>--%>
    <script type="text/javascript" src="res/layui/layui.js"></script>
   <%-- <script runat="server">


    </script>--%>

    <script>		
        layui.config({
            base: 'res/static/js/'
        }).use('blog');
    </script>

    <script id="LAY-msg-tpl" type="text/html">


        <div class="info-box">
            <div class="info-item">
                <img class="info-img" src="{{ d.avatar }}" alt="" />
                <div class="info-text">
                    <p class="title">
                        <span class="name">{{ d.username }}</span>
                        <span class="info-img">
                            <i class="layui-icon layui-icon-praise"></i>
                            {{ d.praise }}
                        </span>
                    </p>
                    <p class="info-intr">
                        {{ d.content }}
                    </p>
                </div>
            </div>
        </div>
    </script>
</body>
</html>
